inspector: Drop the button path
authorMatthias Clasen <mclasen@redhat.com>
Fri, 10 Oct 2014 19:52:48 +0000 (15:52 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 11 Oct 2014 04:59:36 +0000 (00:59 -0400)
The button path takes up quite a bit of room, and is not _that_
useful. If this information is useful, it can find a new home
on the misc tab.

gtk/inspector/Makefile.am
gtk/inspector/button-path.c [deleted file]
gtk/inspector/button-path.h [deleted file]
gtk/inspector/button-path.ui [deleted file]
gtk/inspector/button-path.ui.h [deleted file]
gtk/inspector/init.c
gtk/inspector/inspector.gresource.xml
gtk/inspector/window.c
gtk/inspector/window.h
gtk/inspector/window.ui

index dfd54e09f3e4b534852344a1e9e0cc05217b9dd0..0069e6e6ccaccef406aadf4382a39886a9195a7d 100644 (file)
@@ -19,8 +19,6 @@ libgtkinspector_la_SOURCES =          \
        action-editor.c                 \
        actions.h                       \
        actions.c                       \
-       button-path.h                   \
-       button-path.c                   \
        classes-list.h                  \
        classes-list.c                  \
        css-editor.h                    \
@@ -95,7 +93,6 @@ libgtkinspector_la_LDFLAGS =          \
 
 templates =                            \
        actions.ui                      \
-       button-path.ui                  \
        classes-list.ui                 \
        css-editor.ui                   \
        data-list.ui                    \
diff --git a/gtk/inspector/button-path.c b/gtk/inspector/button-path.c
deleted file mode 100644 (file)
index cfd7041..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2013 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#include "config.h"
-#include <glib/gi18n-lib.h>
-
-#include "button-path.h"
-
-#include "gtkbutton.h"
-#include "gtkwidgetpath.h"
-
-struct _GtkInspectorButtonPathPrivate
-{
-  GtkWidget *sw;
-  GtkWidget *button_box;
-};
-
-G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorButtonPath, gtk_inspector_button_path, GTK_TYPE_BOX)
-
-static void
-gtk_inspector_button_path_init (GtkInspectorButtonPath *bp)
-{
-  bp->priv = gtk_inspector_button_path_get_instance_private (bp);
-  gtk_widget_init_template (GTK_WIDGET (bp));
-}
-
-static void
-gtk_inspector_button_path_class_init (GtkInspectorButtonPathClass *klass)
-{
-  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
-  gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/inspector/button-path.ui");
-  gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorButtonPath, sw);
-  gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorButtonPath, button_box);
-}
-
-void
-gtk_inspector_button_path_set_object (GtkInspectorButtonPath *bp,
-                                      GObject                *object)
-{
-  GtkContainer *box = GTK_CONTAINER (bp->priv->button_box);
-  GtkWidget *b;
-
-  gtk_container_foreach (box, (GtkCallback)gtk_widget_destroy, NULL);
-
-  if (GTK_IS_WIDGET (object))
-    {
-      GtkWidget *widget = GTK_WIDGET (object);
-      gchar *path, **words;
-      gint i;
-
-      path = gtk_widget_path_to_string (gtk_widget_get_path (widget));
-      words = g_strsplit (path, " ", 0);
-
-      for (i = 0; i < g_strv_length (words); i++)
-        {
-          b = gtk_button_new_with_label (words[i]);
-          gtk_widget_show (b);
-          gtk_container_add (box, b);
-        }
-
-      g_strfreev (words);
-      g_free (path);
-    }
-}
-
-// vim: set et sw=2 ts=2:
diff --git a/gtk/inspector/button-path.h b/gtk/inspector/button-path.h
deleted file mode 100644 (file)
index c16efb6..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2013 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#ifndef _GTK_INSPECTOR_BUTTON_PATH_H_
-#define _GTK_INSPECTOR_BUTTON_PATH_H_
-
-
-#include <gtk/gtkbox.h>
-
-#define GTK_TYPE_INSPECTOR_BUTTON_PATH            (gtk_inspector_button_path_get_type())
-#define GTK_INSPECTOR_BUTTON_PATH(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_INSPECTOR_BUTTON_PATH, GtkInspectorButtonPath))
-#define GTK_INSPECTOR_BUTTON_PATH_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_INSPECTOR_BUTTON_PATH, GtkInspectorButtonPathClass))
-#define GTK_INSPECTOR_IS_BUTTON_PATH(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_INSPECTOR_BUTTON_PATH))
-#define GTK_INSPECTOR_IS_BUTTON_PATH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_INSPECTOR_BUTTON_PATH))
-#define GTK_INSPECTOR_BUTTON_PATH_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_INSPECTOR_BUTTON_PATH, GtkInspectorButtonPathClass))
-
-
-typedef struct _GtkInspectorButtonPathPrivate GtkInspectorButtonPathPrivate;
-
-typedef struct _GtkInspectorButtonPath
-{
-  GtkBox parent;
-  GtkInspectorButtonPathPrivate *priv;
-} GtkInspectorButtonPath;
-
-typedef struct _GtkInspectorButtonPathClass
-{
-  GtkBoxClass parent;
-} GtkInspectorButtonPathClass;
-
-
-G_BEGIN_DECLS
-
-GType      gtk_inspector_button_path_get_type   (void);
-void       gtk_inspector_button_path_set_object (GtkInspectorButtonPath *bp,
-                                                 GObject                *object);
-
-G_END_DECLS
-
-
-#endif // _GTK_INSPECTOR_BUTTON_PATH_H_
-
-// vim: set et sw=2 ts=2:
diff --git a/gtk/inspector/button-path.ui b/gtk/inspector/button-path.ui
deleted file mode 100644 (file)
index 0002873..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface domain="gtk30">
-  <template class="GtkInspectorButtonPath" parent="GtkBox">
-    <property name="orientation">horizontal</property>
-    <child>
-      <object class="GtkScrolledWindow" id="sw">
-        <property name="visible">True</property>
-        <property name="hscrollbar-policy">automatic</property>
-        <property name="vscrollbar-policy">never</property>
-        <property name="hexpand">True</property>
-        <child>
-          <object class="GtkBox">
-            <property name="orientation">horizontal</property>
-            <property name="visible">True</property>
-            <property name="halign">start</property>
-            <child>
-              <object class="GtkButton" id="placeholder">
-                <property name="margin">6</property>
-                <property name="label">X</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkBox" id="button_box">
-                <property name="orientation">horizontal</property>
-                <property name="visible">True</property>
-                <property name="hexpand">True</property>
-                <property name="margin">6</property>
-                <property name="spacing">0</property>
-                <style>
-                  <class name="linked"/>
-                </style>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Choose a widget through the inspector</property>
-                    <property name="hexpand">True</property>
-                    <property name="xalign">0.5</property>
-                  </object>
-                </child>
-              </object>
-            </child>
-          </object>
-        </child>
-      </object>
-    </child>
-  </template>
-  <object class="GtkSizeGroup">
-    <property name="mode">vertical</property>
-    <property name="ignore-hidden">False</property>
-    <widgets>
-      <widget name="placeholder"/>
-      <widget name="button_box"/>
-    </widgets>
-  </object>
-</interface>
diff --git a/gtk/inspector/button-path.ui.h b/gtk/inspector/button-path.ui.h
deleted file mode 100644 (file)
index b3eeb3d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-N_("Choose a widget through the inspector");
index 68d3149c2214466806ac580cccf8b903708a6a4b..8d3ef359f264705f8766d0ed2a1ab410cd80f9c1 100644 (file)
@@ -25,7 +25,6 @@
 #include "init.h"
 
 #include "actions.h"
-#include "button-path.h"
 #include "classes-list.h"
 #include "css-editor.h"
 #include "data-list.h"
@@ -56,7 +55,6 @@ gtk_inspector_init (void)
   gtk_inspector_register_resource ();
 
   g_type_ensure (GTK_TYPE_INSPECTOR_ACTIONS);
-  g_type_ensure (GTK_TYPE_INSPECTOR_BUTTON_PATH);
   g_type_ensure (GTK_TYPE_INSPECTOR_CLASSES_LIST);
   g_type_ensure (GTK_TYPE_INSPECTOR_CSS_EDITOR);
   g_type_ensure (GTK_TYPE_INSPECTOR_DATA_LIST);
index ef57d5eb1904ce3d86775423c4f60be6a60cf170..76385e65125391e6907d17237c342d3178e56c5a 100644 (file)
@@ -2,7 +2,6 @@
 <gresources>
   <gresource prefix="/org/gtk/inspector">
     <file compressed="true">actions.ui</file>
-    <file compressed="true">button-path.ui</file>
     <file compressed="true">classes-list.ui</file>
     <file compressed="true">css-editor.ui</file>
     <file compressed="true">data-list.ui</file>
index 3e3750dbceff6a9598139e51b703701df4d0116e..8a8a27ca1280a12a7b2f60ef3759421c10ef16c5 100644 (file)
@@ -35,7 +35,6 @@
 #include "widget-tree.h"
 #include "python-hooks.h"
 #include "python-shell.h"
-#include "button-path.h"
 #include "size-groups.h"
 #include "style-prop-list.h"
 #include "data-list.h"
@@ -79,7 +78,6 @@ on_widget_tree_selection_changed (GtkInspectorWidgetTree *wt,
   gtk_inspector_signals_list_set_object (GTK_INSPECTOR_SIGNALS_LIST (iw->signals_list), selected);
   gtk_inspector_object_hierarchy_set_object (GTK_INSPECTOR_OBJECT_HIERARCHY (iw->object_hierarchy), selected);
   gtk_inspector_misc_info_set_object (GTK_INSPECTOR_MISC_INFO (iw->misc_info), selected);
-  gtk_inspector_button_path_set_object (GTK_INSPECTOR_BUTTON_PATH (iw->button_path), selected);
   gtk_inspector_classes_list_set_object (GTK_INSPECTOR_CLASSES_LIST (iw->classes_list), selected);
   gtk_inspector_css_editor_set_object (GTK_INSPECTOR_CSS_EDITOR (iw->widget_css_editor), selected);
   gtk_inspector_size_groups_set_object (GTK_INSPECTOR_SIZE_GROUPS (iw->size_groups), selected);
@@ -177,7 +175,6 @@ gtk_inspector_window_class_init (GtkInspectorWindowClass *klass)
   gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, prop_list);
   gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, child_prop_list);
   gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, signals_list);
-  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, button_path);
   gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, classes_list);
   gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, style_prop_list);
   gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_css_editor);
index a9096b2ac17023fced39ac283f9c954f4181bfed..c9fec99e3cccfd82ace39cf196eaf536fa04ab4d 100644 (file)
@@ -48,7 +48,6 @@ typedef struct
   GtkWidget *signals_list;
   GtkWidget *style_prop_list;
   GtkWidget *python_shell;
-  GtkWidget *button_path;
   GtkWidget *classes_list;
   GtkWidget *widget_css_editor;
   GtkWidget *object_hierarchy;
index a2315110fe6964ec82039f5679a8d2b267686284..35cb17bd6f0c8d54f2c7e8fb26f28e154738beac 100644 (file)
           <object class="GtkBox">
             <property name="visible">True</property>
             <property name="orientation">vertical</property>
-            <child>
-              <object class="GtkInspectorButtonPath" id="button_path">
-                <property name="visible">True</property>
-              </object>
-            </child>
             <child>
               <object class="GtkPaned">
                 <property name="visible">True</property>